package com.hx.setting.action.request;

import com.hx.setting.action.request.BaseActionRequest;
import com.hx.setting.entity.Entity;
import org.json.JSONObject;

/**
 * Generate Date : 2014-03-16
 * Generate Version : v3.0
 * Generate Name : Honey v3.1 Test
 * Generate User : THINK
 * JDK Version : 1.5
 */
public class User2roleRequest extends BaseActionRequest implements Entity
{

	/** 主键 */
	private Long	id;

	/** 用户表外键 */
	private Long	userId;

	/** 角色外键 */
	private Long	roleId;

	/** 
	 * 设定主键
	 * @param id
	 */
	public void setId(Long id)
	{
		this.id = id;
	}

	/** 
	 * 获取主键
	 * @return 主键
	 */
	public Long getId()
	{
		return this.id;
	}

	/** 
	 * 设定用户表外键
	 * @param userId
	 */
	public void setUserId(Long userId)
	{
		this.userId = userId;
	}

	/** 
	 * 获取用户表外键
	 * @return 用户表外键
	 */
	public Long getUserId()
	{
		return this.userId;
	}

	/** 
	 * 设定角色外键
	 * @param roleId
	 */
	public void setRoleId(Long roleId)
	{
		this.roleId = roleId;
	}

	/** 
	 * 获取角色外键
	 * @return 角色外键
	 */
	public Long getRoleId()
	{
		return this.roleId;
	}

	public Entity cloneEntity()
	{
		com.hx.setting.entity.User2roleEntity answer = new com.hx.setting.entity.User2roleEntity();
		Object obj = null;
		obj = this.getId();
		if ( obj != null )
		{
			answer.setId( this.getId() );
		}
		obj = this.getUserId();
		if ( obj != null )
		{
			answer.setUserId( this.getUserId() );
		}
		obj = this.getRoleId();
		if ( obj != null )
		{
			answer.setRoleId( this.getRoleId() );
		}
		return answer;
	}

	public JSONObject toJsonObject()
	{
		//禁止调用
		throw new RuntimeException( "禁止调用" );
	}

	public String toXml()
	{
		//禁止调用
		throw new RuntimeException( "禁止调用" );
	}
}
/* Honey v3.1 Test - version:4 - OriginalChecksum:B2e547384a2fe39dc14c40211b00f5b3b (do not edit this line) */
